package tag24_12_08.test;

import javax.swing.JFrame;
import javax.swing.JLabel;

public class Timer {

	public static void main(String[] args) {

		JFrame frame = new JFrame();

		frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		frame.setBounds(100, 200, 600, 150);

		JLabel label = new JLabel();
		frame.add(label);
		
		frame.setVisible(true);

		
		Thread th = new Thread() {
			public void run() {
				
				while(true) {
					
					try { 
						Thread.sleep(5000); 
					} catch(Exception e) {
						System.out.println("Exception: " + e);
					}
					
					label.setText("hallo");
				}
				
			}
		};
		th.start();
		
		
		System.out.println("end of main");
	}

}
